package com.canon.push.service;

import com.canon.push.entity.MessageEntity;
import com.rabbitmq.client.AMQP;
import com.rabbitmq.client.Channel;

public interface IRabbitMqSerivce {

    /**
     * 发送消息
     *
     * @param channel    channel
     * @param exchange   交换机
     * @param routingKey 路由键
     * @param properties 属性
     * @param entity     实体
     */
    void send(Channel channel, String exchange, String routingKey, AMQP.BasicProperties properties, MessageEntity entity) throws RuntimeException;


    /**
     * 发送消息
     *
     * @param channel    channel
     * @param exchange   交换机
     * @param routingKey 路由键
     * @param entity     实体
     */
    void send(Channel channel, String exchange, String routingKey, MessageEntity entity) throws RuntimeException;

}
